package flater.cairngormtips.controller
{
import com.universalmind.cairngorm.control.FrontController;
import com.universalmind.cairngorm.events.AnnounceFaultEvent;

import flater.cairngormtips.controller.commands.AnnounceFaultEventExampleCommand;
import flater.cairngormtips.controller.commands.FaultCommand;
import flater.cairngormtips.controller.events.AnnounceFaultEventExampleEvent;
	
/**
 *  The Cairngorm FrontController. Maps Cairngorm Events to the appropriate Commands.
 *  (ie when a Cairngorm Event is dispatched, the FrontController handles the event by
 *   instantiating the appropriate command and invoking the execute method on that command.)<br/>
 *  <br/>                                                                                            
 *  Author: <a href="http://www.adamflater.net" target="_blank">Adam Flater</a>
 *  <br/>                                                                                          
 */
public class CairngormTipsFrontController extends FrontController
{
	public function CairngormTipsFrontController()
	{
        //-----------------------------------------------------------------
        //  AnnounceFaultEventExample Mappings
        //-----------------------------------------------------------------

        addCommand( AnnounceFaultEventExampleEvent.ID, AnnounceFaultEventExampleCommand );

        //--------------------------------------
        //  The FaultCommand is mapped to the 
        //  AnnounceFaultEvent for generic 
        //  fault handling
        //--------------------------------------

        addCommand( AnnounceFaultEvent.EVENT_ID, FaultCommand );                              

    }

} //  end class
} //  end package